#@embedLayout()


#define content()

<form id="formIdExt" method="post">
    <input type="hidden" id="dtId" name="dictType.dt_id" value="#(dictType.dtId??)">
    <table class="table table-bordered">
        <tr>
            <td style="padding-top:15px;">类型名称:</td>
            <td>
                <input type="text" id="dtName" name="dictType.dt_name" class="easyui-textbox" data-options="required:true" value="#(dictType.dt_name??)"  style="width: 98%;">
            </td>
        </tr>
        <tr>
            <td style="padding-top:15px;">排序:</td>
            <td>
                <input type="text" class="easyui-numberbox easyui-tooltip" title="只能输入数字" id="orderNumber" name="dictType.order_number" value="#(dictType.order_number??)" style="width: 98%;">
            </td>
        </tr>
    </table>
</form>

#end


#define css()


#end


#define js()

<script type="text/javascript">
    function dict_type_datagrid_save(opr_type) {

        var url = '';
        if (opr_type == 'add') {
            url = contextRootPath + '/dict/dictTypeSave';
        } else {
            url = contextRootPath + '/dict/dictTypeUpdate';
        }

        $('#formIdExt').form('submit', {
            url: url,
            onSubmit: function () {
                var flag = $(this).form('enableValidation').form('validate');
                if (flag) {
                    showProcess(true, '温馨提示', '正在提交数据...');
                }
                return flag;
            },
            success: function (data) {
                showProcess(false);
                var params = {};
                params.element = _datagridExt;
                params.dlgId="dict_ext_form_dlg_id";
                params.data = data;
                //resultCallback(params);

                $.messager.alert('提示', params.data.message, 'info', function () {
                    location.reload();
                });
            },
            onLoadError: function () {
                showProcess(false);
                $.messager.alert('温馨提示', '由于网络或服务器太忙，提交失败，请重试！');
            }
        });
    }

</script>

#end


